#!/bin/bash
echo $(ps -eo pid,comm | grep tpcsrv | grep -v grep )
sleep 1

TPCSRV_PID=$(ps -eo pid,comm | grep tpcsrv | grep -v grep | grep -o '[0-9]\+')

echo "----------------------------------------"

# Monitor进程存在
if [ ${TPCSRV_PID} ] ; then
	echo "杀死进程：${TPCSRV_PID}"
	sudo kill ${TPCSRV_PID}
else
	echo "所求进程不存在"
fi

